<include file="default/public/header_common" />
<div class="pro-list pro-item">
  <div class="am-g">
        <input type="hidden" name="goodsId" id="goodsId" value="{$order['goods']['goodsId']}">
        <input type="hidden" name="orderId" id="orderId" value="{$order['orderId']}">
    <div class="am-u-sm-4 am-list-thumb"> <a href="#" class=""><img src="/{$order['goods']['goodsThumbs']}" /></a> </div>
    <div class="am-u-sm-8 am-list-main">
      <h3 class="am-list-item-hd"><a href="#" class="c-333">{$order['goods']['goodsName']}</a></h3>
      <div class="am-list-item-text">零售价：<span class="c-red">¥{$order['goods']['marketPrice']}</span></div>
      <div class="am-list-item-text">合作价：<span class="c-red">¥{$order['goods']['shopPrice']}.00</span></div>
    </div>
  </div>
</div>
<h3 class="tit-a"><b class="c-red">*</b>退货原因</h3>
<div class="yudo-container">
  <textarea name="content" id="content" style="width: 100%;border: none;" rows="5" id="doc-ta-1" placeholder="请填写您的退货原因，谢谢！"></textarea>
</div>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/webuploader.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/webuploader-style.css" />
<h3 class="tit-a">上传图片（可选，最多可上传6张）</h3>
<div id="wrapper">
    <div id="container">
        <!--头部，相册选择和格式选择-->

        <div id="uploader">
            <div class="queueList">
                <div id="dndArea" class="placeholder">
                    <div id="filePicker"></div>
                    <p>或将照片拖到这里，单次最多可选6张</p>
                </div>
            </div>
            <div class="statusBar" style="display:none;">
                <div class="progress">
                    <span class="text">0%</span>
                    <span class="percentage"></span>
                </div><div class="info"></div>
                <div class="btns">
                    <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" id="pics" value="">
<script type="text/javascript">
    // 添加全局站点信息
    var BASE_URL = 'http://m.yushangcn.com/';
    </script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/webuploader.js?<?php echo rand(10000, 99999);?>"></script>
<script type="text/javascript" src="__PUBLIC__/js/webuploader-upload.js?<?php echo rand(10000, 99999);?>"></script>
<div data-am-widget="navbar" class="am-navbar am-cf navbar-bottom" id="" style="padding-top: .7rem;padding-left: 1rem;padding-right: 1rem;">
  <button type="button" class="am-btn am-btn-danger am-radius am-btn-block am-btn-sm" onClick="doServer()">提交</button>
</div>
<script src="__PUBLIC__/js/common.js"></script> 
<script type="text/javascript">
function doServer(){
	var params = {};
	params.orderId = $.trim($('#orderId').val());
	params.goodsId = $.trim($('#goodsId').val());
	params.content = $.trim($('#content').val());
	params.pics = $.trim($('#pics').val());
	
	if(params.content==''){
	   alert("请填写内容!");
	   return;
	}
	/*if(params.pics==''){
	   alert("请上传图片!");
	   return;
	}*/

	$.post("{:U('Wap/UserOrder/returnGoods')}",params,function(data,textStatus){
		var json = MXC.toJson(data);
		if(json.code == 1) {
			window.location = "{:U('Wap/UserOrder/serviceList')}";
		} else if(json.code == '100001') { 
			alert(json.info);
			window.location = "{:U('Wap/Users/login')}";
		} else {
			alert(json.info);
		}
	});
}
</script>
</body>
</html>